package com.googlecode.gamedroid.event;

public abstract class EventReceiver
{
	protected abstract void doEmit(Event event);
	
	protected abstract void doSyn();
	
	public void emit(Event event, boolean syn)
	{
		doEmit(event);
		if(syn)
			this.doSyn();
	}
	
	public void emit(Event[] events, boolean syn)
	{
		for(Event event : events)
		{
			doEmit(event);
		}
		if(syn)
			this.doSyn();
	}
	
	public abstract void feedback();

	public void syn()
	{
		this.doSyn();
	}
}
